<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增商户业务渠道关系')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-merbusicha-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">商户：</label>
                <div class="col-sm-8">
                    <select id="merchantId" name="merchantId" class="form-control" required>
                        <option th:each="merchant : ${merchantList}" th:value="${merchant.merchantId}"
                                th:text="${merchant.merchantName}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务：</label>
                <div class="col-sm-8">
                    <select id="busiId" name="busiId" class="form-control" required>
                        <option th:each="busi : ${busiList}" th:value="${busi.id}" th:text="${busi.name}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">渠道：</label>
                <div class="col-sm-8">
                    <select id="channelId" name="channelId" class="form-control" required>
                        <option th:each="channel : ${channelList}" th:value="${channel.channelId}"
                                th:text="${channel.channelName}"></option>
                    </select>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">通道权重：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="weightz" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label">启用状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control" required>
                        <option value="1">启用</option>
                        <option value="2">暂停</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "mng/merbusicha"
        $("#form-merbusicha-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-merbusicha-add').serialize());
            }
        }
    </script>
</body>
</html>